<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学IT - 后台管理系统</title>
    <?php include( './views/common/style.html' ) ?>
</head>
<body>
    
    <!-- 侧边栏 -->
    <?php include( './views/common/aside.html' ) ?>
    <!-- 主体 -->
    <div class="main">
        <div class="container-fluid">
            <!-- 头部 -->
            <?php include( './views/common/header.html' ) ?>
            <div class="body course-add">
                <!-- 面包屑 -->
                <ol class="breadcrumb">
                    <li><a href="javascript:;">课程管理</a></li>
                    <li class="active">课程添加</li>
                </ol>
                <div class="steps">
                    <!-- 摘要, 步骤, 课程图片 -->
                </div>
            </div>
        </div>
    </div>

    <script type="text/template" id="step2Tpl">
        <!-- 摘要 -->
        <div class="brief">
            <div class="thumb">
                {{ if cs_cover }}
                <img src="{{ cs_cover }}" alt="">
                {{ /if }}
            </div>
            <dl class="info">
                <dt>{{ cs_name }}</dt>
                <dd>讲师：{{ tc_name || 未分配 }}</dd>
                <dd>课时：0</dd>
            </dl>
        </div>
        <!-- 步聚 -->
        <ul class="forwards list-unstyled">
            <li>
                <a href="/course/add_step1?cs_id={{ cs_id }}" class="done">
                <b class="fa fa-check"></b>
                基本信息
                </a>
            </li>
            <li>
                <a href="/course/add_step2?cs_id={{ cs_id }}" class="active">
                <b>2</b>
                课程图片
                </a>
            </li>
            <li>
                <a href="/course/add_step3?cs_id={{ cs_id }}">
                <b>3</b>
                课时管理
                </a>
            </li>
        </ul>
        <!-- 课程图片 -->
        <div class="content">
            <!-- 标题 -->
            <div class="title">
                <h5>课程图片 <small>COURSE PICTURE</small></h5>
            </div>
            <!-- 上传图片 -->
            <div class="picture col-md-offset-2">
                <div class="preview">
                {{ if cs_cover_original }}
                    <img src="{{ cs_cover_original }}" alt="">
                {{ /if }}
                </div>
                <p class="tips">
                    可上传jpg, gif, png格式文件, 图片建议尺寸大于300x150，文件大小不能超过2M。
                </p>
                <div class="col-md-2">
                    <!-- <a href="./course_add_step3.html" class="btn btn-success btn-sm">选择图片</a> -->
                    <!-- <input type="file" id="btn_upload" value="选择图片"> -->
                    
                    <input type="file" id="btn_upload" name="btn_upload">
                </div>
                <div class="col-md-2">
                    <!-- <a href="javascript:;" class="btn btn-warning btn-sm" disabled>裁切图片</a> -->
                    <input type="button" 
                           id="btn_selectarea"
                           class="btn btn-warning btn-sm"
                           {{ if !cs_cover_original }}disabled{{ /if }}
                           value="裁切图片">
                </div>
            </div>
        </div>
    </script>


    <?php include( './views/common/script.html' ) ?>
    <script>
        require( [ 'step2' ] );
    </script>
</body>
</html>